package operation;

import book.Book;
import book.BookList;

import java.util.Scanner;

public class FindOperation implements IOperation{
    @Override
    public void work(BookList bookList){
        System.out.println("查找图书");

        int i = FindName.find(bookList);

        if (i != -1){
            System.out.println("找到了，这本书的信息如下");
            Book book = bookList.getPos(i);
            System.out.println(book);
        } else {
            System.out.println("查无此书");
        }
    }
}
